<?php
/*
	
*/
defined('BY_JYA') or exit('Access Denied');
global $_RQ,$_AR;
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
$return['role']=$_SESSION['role'];
if($_RQ['op']=='main'){
	$return['list']=array();
	set_html('title','参与记录');
	exi($return);
}
if($_RQ['op']=='getlist'){
	$pindex = max(1, intval($_RQ['page']));
	$psize = 15;
	$params=array('uniacid'=>$_SESSION['uniacid'],'mid'=>$_SESSION['uid']);
    $orderby='createtime desc';
	$total='';
	$return['list']=pdo_getslice('jy_guashop_feelog',$params,array($pindex,$psize),$total,$fields,'',$orderby);	
	foreach($return['list'] as &$v){
			$v['title']=pdo_getcolumn('jy_guashop_goods',array('id'=>$v['goodsid'],'uniacid'=>$_SESSION['uniacid']),'desc');
			if(!$v['title']){
				$goodsid=pdo_getcolumn('jy_guashop_goods',array('id'=>$v['goodsid'],'uniacid'=>$_SESSION['uniacid']),'goodsid');
				$v['title']=pdo_getcolumn('jy_weishop_goods',array('uniacid'=>$_SESSION['uniacid'],'id'=>$goodsid),'title');
			}
			$v['createtime']=date('Y-m-d H:i:s',$v['createtime']);
			$v['statustitle']=$this->canlog_status[$v['status']];
			$v['typetitle']=$this->feelog_type[$v['type']];
	}
	exi($return);
}
